from lib.config.base import BaseConfig
from utils import common


class LogConfig(BaseConfig):
    def __init__(self, path):
        super().__init__(path)

    def is_enable(self):
        enable = common.get_data_value(self.__config, "enable")
        return enable == 1

    def get_root(self):
        root = common.get_data_value(self.__config, "root") or "/log"
        return root

    def get_output(self):
        output = common.get_data_value(self.__config, "output") or "file"
        return output
